package com.gxa.service.impl;

import com.gxa.entity.Encyclopedia;
import com.gxa.mapper.EncyclopediaMapper;
import com.gxa.service.EncyclopediaService;
import com.gxa.vo.EncyclopediaVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EncyclopediaServiceImpl implements EncyclopediaService {

    @Autowired
    private EncyclopediaMapper encyclopediaMapper;

    @Override
    public void insertEncyclopedia(EncyclopediaVo encyclopediaVo) {
        this.encyclopediaMapper.insertEncyclopedia(encyclopediaVo);
    }

    @Override
    public void deleteEncyclopedia(String title) {
        this.encyclopediaMapper.deleteEncyclopedia(title);
    }

    @Override
    public List<EncyclopediaVo> queryEncyclopediaAll() {
        return this.encyclopediaMapper.queryEncyclopediaAll();
    }

    @Override
    public List<EncyclopediaVo> queryEncyclopediaByName(String title) {
        return this.encyclopediaMapper.queryEncyclopediaByName(title);
    }

    @Override
    public List<EncyclopediaVo> queryEncyclopedia(EncyclopediaVo encyclopediaVo) {
        return this.encyclopediaMapper.queryEncyclopedia(encyclopediaVo);
    }

    @Override
    public int queryEncyclopediaId(EncyclopediaVo encyclopediaVo) {
        return this.encyclopediaMapper.queryEncyclopediaId(encyclopediaVo);
    }

    @Override
    public void updateEncyclopedia(EncyclopediaVo encyclopediaVo) {
        this.encyclopediaMapper.updateEncyclopedia(encyclopediaVo);
    }
}
